package com.hnkywl.sts.entity.base;

import com.hnkywl.sts.entity.BaseEntity;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：数据字典索引
 * 包:        com.hnkywl.sts.entity.base
 * 类描述:    数据字典索引
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_SYS_SJZDSY")
@Where(clause = "deleted!='1'")
public class Sjzdsy extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqSjzdsy", allocationSize = 1, sequenceName = "SEQ_SYS_SJZDSY")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqSjzdsy")
    private Long id;

    /**
     * 编码
     */
    private String bm;

    /**
     * 名称
     */
    private String mc;

    /**
     * 类型 0、系统使用；1、合同文本使用
     */
    private Integer lx;

    /**
     * 关联值
     */
    @OneToMany(mappedBy = "sjzdsy", cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Sjzdz.class)
    @Where(clause = "deleted!='1'")
    private List<Sjzdz> glz;

    /**
     * 备注
     */
    private String bz;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMc() {
        return mc;
    }

    public void setMc(String mc) {
        this.mc = mc;
    }

    public Integer getLx() {
        return lx;
    }

    public void setLx(Integer lx) {
        this.lx = lx;
    }

    public List<Sjzdz> getGlz() {
        return glz;
    }

    public void setGlz(List<Sjzdz> glz) {
        this.glz = glz;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getBm() {
        return bm;
    }

    public void setBm(String bm) {
        this.bm = bm;
    }
}
